x = 1
y = 2

numlist = [1,2]
while y <= 4000000:
    x, y = y, y + x
    if y <= 4000000:
        numlist.append(y)

print(sum(x for x in numlist if x % 2 == 0))